﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace DongFangGuoKai.WMSPlatform.Domain.Models
{
    /// <summary>
    /// 收货单
    /// </summary>
    public partial class TReceivingBill
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 单号（委托单号）
        /// </summary>
        public string? BillNo { get; set; }
        /// <summary>
        /// 供应商Id
        /// </summary>
        public int? SupplierId { get; set; }
        /// <summary>
        /// 供应商名称
        /// </summary>
        public string? SupplierName { get; set; }
        /// <summary>
        /// 状态：0-未开始；1-未完成；2-已完成 3-已作废
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 样品数量
        /// </summary>
        public int? SampleTotalCount { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        public string? CustomerName { get; set; }

        /// <summary>
        /// 客户电话
        /// </summary>
        public string? CustomerPhone { get; set; }


        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateDate { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? BeginDate { get; set; }
        /// <summary>
        /// 完成时间
        /// </summary>
        public DateTime? EndDate { get; set; }
        /// <summary>
        /// 关联单号
        /// </summary>
        public string? RefSn { get; set; }
        /// <summary>
        /// 收货人
        /// </summary>
        public string? Receiver { get; set; }
        /// <summary>
        /// 库存地点
        /// </summary>
        public string? StoLocation { get; set; }
        public decimal? TotalQty { get; set; }
        public decimal? TotalCheckQty { get; set; }
        public decimal? CheckedQty { get; set; }
        public bool? IsCreatedChecklist { get; set; }
        public int? CheckType { get; set; }
        public int? CheckResult { get; set; }
        public string? Ngreason { get; set; }
        public int? WarehouseId { get; set; }
        public string? WarehouseCode { get; set; }
        public string? WarehouseName { get; set; }
        public decimal? TotalPrice { get; set; }
        public int? CreateUserId { get; set; }
        public string? CreateUserName { get; set; }

        /// <summary>
        /// 收货单单详情
        /// </summary>
        [NotMapped]
        public List<TReceivingBillDetail>? BillDetailList
        {
            get; set;
        }

        /// <summary>
        /// 已经收货数量
        /// </summary>
        [NotMapped]
        public decimal? ReceivedQTY { get; set; }
    }
}
